import { createRouter, createWebHashHistory } from 'vue-router'

const router = createRouter({
    linkActiveClass: 'active',
    history: createWebHashHistory(), // hash模式：createWebHashHistory，history模式：createWebHistory
    routes: [
        {
            path: '/',
            redirect: '/home'
        },
        {
            path: '/',
            name: 'home',
            component: () => import('@/views/Home.vue'),
            children: [
                {
                    path: "/home",
                    name: "home",
                    meta: {
                        title: '系统首页'
                    },
                    component: () => import ( /* webpackChunkName: "dashboard" */ "../views/DashBoard.vue")
                },
            ]
        },
    ]
})

export default router
